feat(table): add column picker to TanStack table toolbar#8399
Open
LWS49 wants to merge 1 commit into
Open
Conversation
eddc2d0 to
df5727b
Compare
b81cc05 to
5176703
Compare
1da9168 to
9eb203a
Compare
…alog, toolbar buttons, visibility state, and tests
- Add MuiColumnPickerDialog with Apply/Export actions, locked-column enforcement, and optional dataColumnIds hint when no data columns are selected
- Update MuiTableToolbar to render a trigger button (opens dialog) and a direct export button alongside the existing CSV download icon
- Extend useTanStackTableBuilder with column visibility state (localStorage persistence, dynamic reconciliation), onExportFromPicker, onDirectExport, and cross-page selection helpers (selectedCount, toggleAllFiltered, etc.)
- Add ColumnPickerTemplate interface and Body.ts selection fields
- Add full test coverage for dialog, toolbar, and hook behaviour
- Add lib.components.table.* locale keys (en/ko/zh)
9eb203a to
58ef551
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the column picker infrastructure to the shared table library - a dialog that lets users select which columns to include before exporting CSV. The feature is implemented but not yet wired to any table; the next PR will integrate it with the statistics tables.
The PR also moves
IndentedCheckboxtolib/components/core/as it is used by the column picker tree beyond the existing duplication bundle.Design decisions
onExportFromPickernow receives the enforced visibility map from the dialog instead of being a no-arg thunk. This makes the CSV pipeline independent of when React flushes the state update.Regression prevention
Tests cover: column picker dialog (staged state, locked columns, identifiers guard),
ColumnPickerTreeGrouptree rendering and bulk selection, CSV generator with and withoutvisibilityOverride,useTanStackTableBuildercolumn visibility state and CSV download (including theindices: trueoffset case), toolbar Export button rendering.Manual testing confirmed no regression in existing CSV download: student statistics CSV downloads correctly with no active search and with a search filter applied; assessment statistics CSV downloads with no columns selected and with all columns selected.
Backward compatibility fully preserved -
columnPickeris opt-in onTableTemplate; all existing tables are unaffected.